package fina2.dcs.security;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.log4j.Logger;
import org.jboss.seam.Component;

import fina2.dcs.upload.UploadedFileLocal;

public class LogoutServlet extends HttpServlet {
	private Logger log = Logger.getLogger(getClass());

	public void service(HttpServletRequest req, HttpServletResponse res) {
		try {
			log.info("Logging out");
			HttpSession sess = req.getSession();
			sess.invalidate();
			res.sendRedirect("/fina-dcs-wp/");
		} catch (Exception ex) {
			log.error(ex.getMessage(), ex);
		}
	}
}
